:root {
  // https://github.com/nextcloud/server/blob/0cd536786b9df555e2e6110f98b41856f0d51313/core/css/apps.scss#L29
  // This is only used for #content and not actually for the body element
  --body-height: calc(100% - 50px - var(--body-container-margin));
}

body {
  overflow: hidden;

  * {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
  }
}

// Nextcloud 25+: get rid of gap and border radius at right
#content-vue {
  // was var(--body-container-radius)
  // now set on .app-navigation
  border-radius: 0;
  width: calc(100% - var(--body-container-margin) * 1); // was *2
  margin-right: 0;

  // If no navigation remove both margins
  &:not(.has-nav) {
    width: calc(100%);
    margin-left: 0;
  }

  // Prevent content overflow on NC <25
  max-height: 100vh;

  // https://bugs.webkit.org/show_bug.cgi?id=160953
  overflow: visible;

  > div.app-navigation {
    // Reduce size of navigation bar
    --app-navigation-max-width: 250px !important;
    max-width: var(--app-navigation-max-width); // NC <29

    // Rounded corners only on left
    border-top-left-radius: var(--body-container-radius);
    border-bottom-left-radius: var(--body-container-radius);

    .app-navigation-toggle {
      // Move up to align with back button of top matter
      top: 2px;
      transition: opacity 0.1s ease-in-out;
      background-color: transparent;
      opacity: 0.2; // It's ugly
      &:hover {
        opacity: 1;
      }
    }
  }
}

// Hide horizontal scrollbar on mobile
// For the padding removal above
#app-content-vue {
  overflow-x: hidden;
}
